# -*- coding: utf-8 -*-
def get_inquiry_record(inquiry_list):
    symptom_list = []
    utterance = ''
    for i in inquiry_list:
        if i[1] is None:
            continue
        symptom = i[0]
        if symptom not in symptom_list:
            utterance = utterance[:-1] + '；\n'
            symptom_list.append(symptom)
            utterance += f'该患者有{symptom}症状，详细信息为：'
        property = i[1]
        option = i[2]
        if option == '以上都不是':
            continue
        utterance += f'{property} — {option}，'
    utterance = utterance[2:-1] + '。'
    return utterance


if __name__ == '__main__':
    inquiry_list = [['发热', None, '是'], ['发热', '发病时间', '午后'],
                    ['发热', '类型', '低热'], ['发热', '缓解时间', '以上都不是'],
                    ['发热', '加重时间', '傍晚'], ['发热', '程度', '低热'],
                    ['咳嗽', None, '是'], ['咳嗽', '发病时间', '夜间'], ['咳嗽', '类型', '刺激性'], ]

    utterance = get_inquiry_record(inquiry_list)
    print(utterance)
